/*
* Copyright (c) 2011 Connection Road.  All rights reserved.
* This program and the accompanying material are made available
* under the terms of the Eclipse Public Licnese v1.0 which is
* available at http://www.eclipse.org/legal/epl-v10.html
*/

using System;
using System.Drawing;
using System.Windows.Forms;
using CrSyncFilesForms.Properties;

namespace CrSyncFilesForms
{
    public partial class CRSyncUiBlueDotWithText : UserControl
    {
        public string TextString
        {
            get { return DefaultText.Text; } 
            set
            {
                DefaultText.Text = value;
                Width = defaultPictureBox.Width + DefaultText.Width;
            }
        }

        // NOTE: Are we going to hide some of the options?
        public new Color DefaultForeColor
        {
            get { return ForeColor; }
 
            set
            {
                ForeColor = value;
                DefaultText.ForeColor = value;
            }
        }

        private bool _enabledlook;
        public bool EnabledLook
        {
            get { return _enabledlook;}
            set 
            { 
                _enabledlook = value;
                if(_enabledlook)
                {
                    DefaultForeColor = Color.FromArgb(100, 165, 229);
                    defaultPictureBox.Image = Resources.CRSyncFiles_GrayDotWithCheckMark2;
                    defaultPictureBox.Refresh();
                }else
                {
                    DefaultForeColor = Color.Gray;
                    defaultPictureBox.Image = Resources.CRSyncFiles_GrayDotWithCheckMark1;
                    defaultPictureBox.Refresh();
                    
                }
            }
        }

        public CRSyncUiBlueDotWithText()
        {
            InitializeComponent();
            Load += CallBackOnLoad;
        }


        void CallBackOnLoad(object  sender, EventArgs e)
        {
            EnabledLook = true;
            DefaultText.Text = TextString;
        }
       
    }
}
